21 TT = 15:BT = 24: GOSUB 611: GOSUB 621: VTAB 16: GOSUB 641:W = 38:B = 9:T = 3:L = 1:X = 1: GOSUB 741: IF E = 1 THEN GOSUB 631: PRINT "Please type PRINT and a number,": PRINT "then press RETURN.": GOTO 21
31 BS = X: GOSUB 781: ON E = 1 GOTO 21
41 GOSUB 741: IF E = 1 THEN GOSUB 631: PRINT "You typed "; MID$ (AN$,BS);".": PRINT "Don't be shy. Please type PRINT": PRINT "and follow it with a number.": GOTO 21
45 IF MID$ (AN$,X) = "" THEN GOSUB 631: PRINT "You typed "; MID$ (AN$,BS);".": PRINT "You should follow PRINT with": PRINT "some number. Please try again.": GOTO 21
51 Z = 0:FI$ = MID$ (AN$,X):NU$ = MID$ (AN$,X):EN = LEN(FI$): GOSUB 971: IF E < >1 AND E < >2 GOTO 81
61 IF E = 1 THEN GOSUB 631: PRINT "You typed "; MID$ (AN$,BS);".": PRINT "You shouldn't use letters or": PRINT "symbols (except - or .) in your": PRINT "numbers. Please try again.": GOTO 21
71 IF E = 2 THEN GOSUB 631: PRINT "Although the Apple II can handle": PRINT "numbers up to 38 characters long,": PRINT "this simulation will only handle": PRINT "numbers up to 8 characters long.": GOTO 21
81 IF MID$ (AN$,X,1) = "0" THEN Z = 1
91 NU = VAL(FI$): IF NU = 0 AND Z < >1 THEN GOSUB 631: PRINT "You typed "; MID$ (AN$,BS);".": PRINT "You should follow PRINT with some": PRINT "number so that you can continue": PRINT "with the lesson.": GOTO 21
101 VTAB 17: HTAB 1: PRINT NU: GOSUB 631: PRINT "You did very well, ";NA$".": PRINT "Would you like to practice using": PRINT "the PRINT statement again? (Y/N)";
111 CP = 1: GOSUB 641: IF AN$ = "" THEN VTAB 6: HTAB 33: CALL -958: GOTO 111
121 IF ASC(AN$) < >89 AND ASC(AN$) < >78 THEN VTAB 6: HTAB 33: CALL -958: GOTO 111
131 CP = 0: IF ASC(AN$) = 89 THEN GOSUB 611: GOSUB 531: HTAB L: VTAB T +1: PRINT "Okay, type PRINT and follow it": PRINT "with a number (remember to": PRINT "press RETURN).": GOTO 21
171 IF E = 1 THEN GOSUB 631: PRINT "Type PRINT, then type": PRINT "a calculation with two": PRINT "numbers.": GOTO 161
181 BS = X: GOSUB 781: ON E = 1 GOTO 161
191 GOSUB 741: IF E = 1 THEN GOSUB 631: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "It would help if you would type": PRINT "in some numbers after PRINT.": PRINT "Please try again.": GOTO 161
201 IF MID$ (AN$,X,1) = "-" THEN X = X +1:N(1) = 1
211 IF X > LEN(AN$) THEN E = 1: GOTO 171
221 GOSUB 811: IF SN = 1 AND SY$ < >"+" THEN GOSUB 631: PRINT "You typed "; MID$ (BU$,BS)".": PRINT "For this to work, you must use": PRINT "the correct symbol (+). Please": PRINT "try again.": GOTO 161
231 IF E < >1 AND E < >2 AND E < >3 GOTO 271
241 IF E = 2 THEN GOSUB 631: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "For this to work, you must use": PRINT "one of the symbols below.": PRINT "Please try again.": GOTO 161
251 IF E = 3 THEN GOSUB 631: PRINT "You typed "; MID$ (BU$,BS)".": PRINT "You found the right key, but": PRINT "forgot to press SHIFT key.": PRINT "Please try again.": GOTO 161
261 IF E = 1 THEN GOSUB 631: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "You should not have pressed the": PRINT "SHIFT key when you typed the": PRINT "symbol. Please try again.": GOTO 161
271 GOSUB 911: IF E = 1 THEN GOSUB 631: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "Please type in both numbers.": PRINT "Try again.": GOTO 161
281 GOSUB 961: ON E < >1 AND E < >2 GOTO 321
291 IF E = 1 THEN GOSUB 631: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "You shouldn't use letters or": PRINT "symbols (except - or .) in your": PRINT "numbers. Please try again.": GOTO 161
301 IF E = 2 AND SY$ < >"*" THEN GOSUB 631: PRINT "Although the Apple II can handle": PRINT "numbers up to 38 characters long,": PRINT "this simulation will only handle": PRINT "numbers up to 8 characters long.": GOTO 161
311 IF E = 2 AND SY$ = "*" THEN GOSUB 631: PRINT "Although the Apple II can handle": PRINT "numbers up to 38 characters long,": PRINT "this simulation will only handle": PRINT "numbers up to 4 characters long.": GOTO 161
321 AN$ = MID$ (AN$,X):X = SL +1: IF E = 3 THEN GOSUB 631: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "It would help if you would type": PRINT "in both numbers. Please try again.": GOTO 161
331 GOSUB 741: IF E = 1 THEN GOSUB 631: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "It would help if you would type": PRINT "in both numbers. Please try again.": GOTO 161
341 IF LEFT$(ST$,1) = "-" THEN X = X +1:N(2) = 1:ZC = 1
351 GOSUB 1011: ON E = 1 OR E = 2 OR E = 3 GOTO 291: GOSUB 1091: ON DE < >1 GOTO 371
361 GOSUB 631: PRINT "You typed "; MID$ (BU$,BS);".": PRINT "Dividing by 0 will cause an error": PRINT "message. Please try again.":DE = 0: GOTO 161
371 VTAB 13: HTAB 1: PRINT FS: IF SN < >1 THEN 401
381 GOSUB 631: PRINT "Very good! As you might guess,": PRINT "the computer can handle other": PRINT "operations. The box below": PRINT "shows you the symbols."
401 IF SN < >1 THEN GOSUB 631: PRINT "And there is the answer.": PRINT "Would you like to practice": PRINT "some other calculations? (Y/N)";: GOTO 431
411 GOSUB 631: PRINT : PRINT "Would you like to practice": PRINT "some other calculations? (Y/N)";
421 CP = 1: GOSUB 641: IF AN$ = "" THEN VTAB 6: HTAB 31: CALL -958: GOTO 421
431 IF ASC(AN$) < >89 AND ASC(AN$) < >78 THEN VTAB 6: HTAB 31: CALL -958: GOTO 421
441 CP = 0:SN = SN +1: IF ASC(AN$) = 78 THEN 461
451 SY$ = "-": GOSUB 631: PRINT "Okay, type in any calculation": PRINT "using one of the math symbols": PRINT "below (don't forget to start with": PRINT "PRINT).": GOTO 161